package capricornus.components.richtextfield
{
	import com.riaidea.text.RichTextField;
	import com.riaidea.text.SpriteRenderer;
	
	internal class SpriteRenderEx extends SpriteRenderer
	{
		public function SpriteRenderEx(rtf:RichTextField)
		{
			super(rtf);
		}
		
		/*public function exportXML():XML
		{
			var arr:Array = [];
			for (var s:* in _spriteIndices)
			{
				var info:Object = { src:getQualifiedClassName(s), index:s.name };
				arr.push(info);
			}
			if (arr.length > 1) arr.sortOn("index", Array.NUMERIC);
			
			var xml:XML =<sprites/>;
			for (var i:int = 0; i < arr.length; i++)
			{
				var node:XML = <sprite src={arr[i].src} index={arr[i].index - i} />;
				xml.appendChild(node);
			}
			return xml;
		}*/
		
		override public function exportXML():XML
		{
			var arr:Array = [];
			for (var s:* in _spriteIndices)	
			{
				var info:Object = { src:Face(s).cmdData, index:s.name };
				arr.push(info);
			}
			if (arr.length > 1) arr.sortOn("index", Array.NUMERIC);
			
			var xml:XML =<sprites/>;
			for (var i:int = 0; i < arr.length; i++)
			{
				var node:XML = <sprite src={arr[i].src} index={arr[i].index - i} />;
				xml.appendChild(node);
			}
			return xml
		}
	}
}

















